package cn.boysoft.core.model.entity;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

import org.hibernate.annotations.GenericGenerator;

import cn.boysoft.core.log.OperateLogKeyword;
import cn.boysoft.core.model.DataObject;

/**
 * 所有实体的基类
 * @author 付厚俊
 * CreateTime 2013-4-4 上午11:20:45
 */
@MappedSuperclass
public abstract class Entity extends DataObject implements OperateLogKeyword{
	private static final long serialVersionUID = -19892559104404348L;
	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(length = 36)
	private String id;
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Override
	public String getOperateLogKeyword() {
		return this.id;
	}
	
	
}
